<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>测试文件</h2>
</body>

</html>
<script>
    // 从页面发送ajx请求走aph道路访问没用路由访问
    // let http = new XMLHttpRequest();
    // http.open("get", 'http://10.35.164.168:8080/test');
    // http.send();
    // http.onreadystatechange = function(error, data) {
    //         if (http.readyState === 4) {
    //             console.log(http.responseText)
    //         }
    //     }
    // 请求出错是存在跨域问题
    // 利用JSONP
    function fun(data) {
        console.log(data)
            // data代表后端返回实参数据的内
    }
    let script = document.createElement("script");
    script.setAttribute("src", 'http://10.35.164.168:8080/test?callback=momo')
    document.querySelector("body").appendChild(script)
</script>